/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author Cheng
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '/@/api/model/baseModel';

const { adminPath } = useGlobSetting();

export interface HelpCenterInfo extends BasicModel<HelpCenterInfo> {
  moduleType?: string; // 模块对象（安全端 / 维保端 / 监管端）
  title?: string; // 标题
  description?: string; // 描述内容
  videoUrl?: string; // 视频地址
  createTime?: string; // 创建时间
  deleted?: string; // 是否删除（false-未删除，true-已删除）
}

export const helpCenterInfoList = (params?: HelpCenterInfo | any) =>
  defHttp.get<HelpCenterInfo>({ url: adminPath + '/helpvideo/helpCenterInfo/list', params });

export const helpCenterInfoListData = (params?: HelpCenterInfo | any) =>
  defHttp.post<Page<HelpCenterInfo>>({ url: adminPath + '/helpvideo/helpCenterInfo/listData', params });

export const helpCenterInfoForm = (params?: HelpCenterInfo | any) =>
  defHttp.get<HelpCenterInfo>({ url: adminPath + '/helpvideo/helpCenterInfo/form', params });

export const helpCenterInfoSave = (params?: any, data?: HelpCenterInfo | any) =>
  defHttp.postJson<HelpCenterInfo>({ url: adminPath + '/helpvideo/helpCenterInfo/save', params, data });

export const helpCenterInfoDelete = (params?: HelpCenterInfo | any) =>
  defHttp.get<HelpCenterInfo>({ url: adminPath + '/helpvideo/helpCenterInfo/delete', params });
